import service from '@/utils/request'

// @Tags SolarTerms
// @Summary 创建节气
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SolarTerms true "创建节气"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /solarTerms/createSolarTerms [post]
export const createSolarTerms = (data) => {
  return service({
    url: '/solarTerms/createSolarTerms',
    method: 'post',
    data
  })
}

// @Tags SolarTerms
// @Summary 删除节气
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SolarTerms true "删除节气"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /solarTerms/deleteSolarTerms [delete]
export const deleteSolarTerms = (data) => {
  return service({
    url: '/solarTerms/deleteSolarTerms',
    method: 'delete',
    data
  })
}

// @Tags SolarTerms
// @Summary 批量删除节气
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除节气"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /solarTerms/deleteSolarTerms [delete]
export const deleteSolarTermsByIds = (data) => {
  return service({
    url: '/solarTerms/deleteSolarTermsByIds',
    method: 'delete',
    data
  })
}

// @Tags SolarTerms
// @Summary 更新节气
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SolarTerms true "更新节气"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /solarTerms/updateSolarTerms [put]
export const updateSolarTerms = (data) => {
  return service({
    url: '/solarTerms/updateSolarTerms',
    method: 'put',
    data
  })
}

// @Tags SolarTerms
// @Summary 用id查询节气
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.SolarTerms true "用id查询节气"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /solarTerms/findSolarTerms [get]
export const findSolarTerms = (params) => {
  return service({
    url: '/solarTerms/findSolarTerms',
    method: 'get',
    params
  })
}

// @Tags SolarTerms
// @Summary 分页获取节气列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取节气列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /solarTerms/getSolarTermsList [get]
export const getSolarTermsList = (params) => {
  return service({
    url: '/solarTerms/getSolarTermsList',
    method: 'get',
    params
  })
}

// @Tags SolarTerms
// @Summary 设置节气关联文章
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "设置节气关联文章"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"设置节气关联文章"}"
// @Router /solarTerms/setSolarTermsArticle [post]
export const setSolarTermsArticle = (data) => {
  return service({
    url: '/solarTerms/setSolarTermsArticle',
    method: 'post',
    data
  })
}


// @Tags SolarTerms
// @Summary 获取节气关联文章
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "获取节气关联文章"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取节气关联文章"}"
// @Router /solarTerms/getSolarTermsArticle [get]
export const getSolarTermsArticle = (params) => {
  return service({
    url: '/solarTerms/getSolarTermsArticle',
    method: 'get',
    params
  })
}
